function [signX] = sgn(x)
%SGN Finds sign (-1, 0, or 1) of value
%   Of course Matlab has it's own "sign" function, but I wanted to
%   implement my own just because...why not?
%
%   ***********************************************************************
%   Author: Mathieu Boudreau, BSc, MSc, PhD Candidate (BME)
%   Institute: Montreal Neurological Institute, McGill University
%   Contact: mathieu.boudreau2 (at) mail.mcgill.ca
%   Date: July 15th 2014
%   ***********************************************************************


if x<0
    signX=-1;
elseif x == 0
    signX=0;
elseif x>0
    signX=1;
end
    

end

